package org.lego.biz.task.management.base.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.lego.biz.task.management.base.entity.base.UUIDWithTimeAndStatusEntity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.List;

/**
 * Created by hr.qjy on 16/11/17.
 * 任务清单
 */
@Entity
@Table(name = "biz_task_inventory")
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
public class TaskInventory extends UUIDWithTimeAndStatusEntity {
    public static final String ARCHIVED_STATUS_NORMAL = "0";
    public static final String ARCHIVED_STATUS_ARCHIVED = "9";
    private String name;        // 清单名称
    private String description; // 清单描述
    private String archivedStatus; // 归档状态 0-正常 1-归档
    @OneToMany
    @JoinColumn(name = "inventory_id")
    private List<Task> tasks;
}
